#pragma once

#include "D3DInterface.h"
#include <d3dx9mesh.h>

class CCreateMeshFVF : public IFramework
{
public:
	CCreateMeshFVF(IDirect3DDevice9 **p);
	virtual ~CCreateMeshFVF(void);

	// Interface
public:
	virtual bool Setup();
	virtual bool Display(float timeDelta);
	virtual void Cleanup();

	struct Vertex
	{
		Vertex(){}
		Vertex(float x, float y, float z,
			float nx, float ny, float nz)
		{
			_x = x; _y = y; _z = z;
			_nx = nx; _ny = ny; _nz = nz;
		}
		float _x, _y, _z, _nx, _ny, _nz;

		static const DWORD FVF;
	};

private:
	IDirect3DDevice9 *pDevice;

	ID3DXMesh* Mesh;
	D3DMATERIAL9 mtrl[3];
};

